package com.chrray.position.enums.app;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 0-待审核／-1 驳回／1-进行中／2-已完成／3-已结束/4-已下架
 */
public enum FdJobCheckStateEnum implements BaseEnum{
    PENDING(0, "待审核"),
    IN_PROGRESS(1, "审核通过"),
    FAIL(2, "审核不通过"),




    ;

    @JsonValue
    @EnumValue
    private final Integer value;
    private final String info;

    FdJobCheckStateEnum(Integer value, String info) {
        this.info = info;
        this.value = value;
    }

    @JsonCreator
    public static FdJobCheckStateEnum getByValue(Integer value) {
        for (FdJobCheckStateEnum en : FdJobCheckStateEnum.values()) {
            if (en.getValue().equals(value)) {
                return en;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public String getInfo() {
        return info;
    }
}
